<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:48:"/home/wwwroot/crm/app/index/view/shops/edit.html";i:1513069689;s:42:"/home/wwwroot/crm/app/index/view/base.html";i:1512719636;}*/ ?>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>山东归仁生物科技有限公司<?php echo HTRConf('CONF.appName'); ?></title>
<meta name="Keywords" content=""/>
<meta name="Description" content=""/> 
<link href="__INDEX__/js/ligerui/skins/Aqua/css/ligerui-all.css?v=<?php echo $v; ?>" rel="stylesheet" type="text/css" /> 
<link href="__STATIC__/plugins/validator/jquery.validator.css?v=<?php echo $v; ?>" rel="stylesheet">

<link href="__INDEX__/css/style.css?v=<?php echo $v; ?>" rel="stylesheet" type="text/css" />   
<script src="__STATIC__/js/jquery.min.js?v=<?php echo $v; ?>"></script>  
<script src="__INDEX__/js/ligerui/js/ligerui.all.js?v=<?php echo $v; ?>" type="text/javascript"></script> 
<script type='text/javascript' src='__STATIC__/plugins/layer/layer.js?v=<?php echo $v; ?>'></script> 
<script src="__STATIC__/js/common.js?v=<?php echo $v; ?>"></script>
<script>
window.conf = {"ROOT":"__ROOT__","APP":"__APP__","STATIC":"__STATIC__","SUFFIX":"<?php echo config('url_html_suffix'); ?>","USER_LOGO":"<?php echo HTRConf('CONF.userLogo'); ?>",'GRANT':'<?php echo implode(",",session("HTR_STAFF.privileges")); ?>'}
</script>
<script src="__INDEX__/js/common.js?v=<?php echo $v; ?>"></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.js?v=<?php echo $v; ?>"></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/local/zh-CN.js?v=<?php echo $v; ?>"></script>
</head>
<body>

<div class="l-loading" style="display: block" id="htr-loading"></div>
<form id='editFrom' autocomplete='off'>
<input type='hidden' id='shopId' class='ipt' value="<?php echo $object['shopId']; ?>"/>
<table class='htr-form htr-box-top'>
  <tr>
     <th width='150'>店铺编号<font color='red'>*</font>：</th>
     <td><input type="text" id='shopSn' name='shopSn' class='ipt' value="<?php echo $object['shopSn']; ?>" maxLength='20' data-rule="店铺编号: required;"/></td>
  </tr>
  <tr>
     <th>店铺名称<font color='red'>*</font>：</th>
     <td><input type="text" id='shopName' class='ipt' value="<?php echo $object['shopName']; ?>" maxLength='20' data-rule="店铺名称: required;"/></td>
  </tr>
  <tr>
     <th>联系电话<font color='red'>*</font>：</th>
     <td><input type="text" id='telephone' class='ipt' value="<?php echo $object['telephone']; ?>" maxLength='20' data-rule="店主联系手机: required"/></td>
  </tr>
  <tr>
     <th>所属区域<font color='red'>*</font>：</th>
     <td>
        <select id="area_0" class='ipt j-areas' level="0" onchange="HTR.ITAreas({id:'area_0',val:this.value,isRequire:true,className:'j-areas'});">
	      	<option value="">-请选择-</option>
	      	<?php if(is_array($areaList) || $areaList instanceof \think\Collection): $i = 0; $__LIST__ = $areaList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
	        <option value="<?php echo $vo['areaId']; ?>"><?php echo $vo['areaName']; ?></option>
	        <?php endforeach; endif; else: echo "" ;endif; ?>
	     </select>
     </td>
  </tr>
  <tr>
     <th>店铺详细地址<font color='red'>*</font>：</th>
     <td><input type="text" id='shopAddress' class='ipt' style='width:500px;' value="<?php echo $object['shopAddress']; ?>" maxLength='50' data-rule="店铺详细地址: required;"/></td>
  </tr>
  <tr>
     <th>选择店长<font color='red'>*</font>：</th>
     <td>
        <?php if(is_array($keeperList) || $keeperList instanceof \think\Collection): $i = 0; $__LIST__ = $keeperList;if( count($__LIST__)==0 ) : echo "暂时没有空余店长" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <label><input type="radio" class="ipt" name="staffId" <?=($object['shopId']==$vo['shopId'])?'checked':'';?> value="<?php echo $vo['staffId']; ?>" /><?php echo $vo['staffName']; ?></label>
        <?php endforeach; endif; else: echo "暂时没有空余店长" ;endif; ?>
     </td>
  </tr>
  <tr>
     <th>选择店员<font color='red'>*</font>：</th>
     <td>
        <?php if(is_array($clerkList) || $clerkList instanceof \think\Collection): $i = 0; $__LIST__ = $clerkList;if( count($__LIST__)==0 ) : echo "暂时没有空余店员" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <label><input type="checkbox" class="ipt" name="staffId" <?php if($object['shopId']==$vo['shopId']): ?>checked<?php endif; ?> value="<?php echo $vo['staffId']; ?>" /><?php echo $vo['staffName']; ?></label>
        <?php endforeach; endif; else: echo "暂时没有空余店员" ;endif; ?>
     </td>
  </tr>
  <tr>
     <td colspan='2' align='center'>
       <input type='button' value='保存' class='btn btn-blue' onclick='javascript:save()'>
       <input type='button' value='返回' class='btn' onclick='javascript:history.go(-1)'>
     </td>
  </tr>
</table>
</form>
<script>
$(function(){
  initEdit({
    areaId:'<?php echo $object["areaId"]; ?>',areaIdPath:'<?php echo $object["areaIdPath"]; ?>'
  });
})
</script>


<script src="__INDEX__/shops/shops.js?v=<?php echo $v; ?>" type="text/javascript"></script>

<script>
function showImg(opt){
	layer.photos(opt);
}
function showBox(opts){
	return HTR.open(opts);
}
</script>
</body>
</html>